package com.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.crm.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据姓名模糊查询id
     */
    @Select("select user_id from user where user_name like CONCAT('%', #{name}, '%')")
    List<Long> selectByName(String name);

    int updateById(User user);

}
